package com.chenfan.mcn.component.dict;

import com.chenfan.common.extension.context.SpringContextHolder;
import com.chenfan.mcn.dao.StarBasicDataMapper;
import com.chenfan.common.extension.dict.DictTranslator;
import com.chenfan.mcn.model.StarBasicData;

/**
 * @author: WQ
 * Date 2022/11/4
 * @描述
 */
public class StarBasicDataIdTranslator implements DictTranslator<Long, String> {

    @Override
    public String translate(Long id) {
        StarBasicDataMapper basicDataMapper = SpringContextHolder.getBean(StarBasicDataMapper.class);
        StarBasicData starBasicData = basicDataMapper.selectById(id);
        return starBasicData.getStarNickname();
    }
}
